<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<title>修理</title>
		<!--标准mui.css-->
		<link rel="stylesheet" href="../css/mui.min.css">
		<script src="../js/mui.min.js"></script>

	</head>
	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">维修列表</h1>
		</header>
		<div class="mui-content">
			<ul class="mui-table-view" id="con">
				<!-- --------------------------数据填充----------------------------------------- -->
				<li class="mui-table-view-cell mui-media" name="123">
					<img class="mui-media-object mui-pull-left" src="../image/u=675629265,2686821793&fm=26&gp=0.jpg">
					<div class="mui-media-body">
						教室
						<p class="mui-ellipsis">空调坏了</p>
						<p class="mui-ellipsis">已维修</p>
					</div>
				</li>
				<!-- --------------------------数据填充----------------------------------------- -->
			</ul>
		</div>

		<script>
			function init() {
				mui.ajax({
					url: '',
					type: "post",
					async: false,
					data: {},
					dataType: "json",
					contentType: "application/x-www-form-urlencoded; charset=utf-8",
					jsonp: "jsoncallback",
					success: function(data) {
						var Ele = jQuery("#con");
						Ele.empty();
						var Info = data.gear_list;
						for (var i = 0, l = Info.length; i < l; i++) {
							var tempEle = ' <li class="mui-table-view-cell mui-media">' +
								'<img class="mui-media-object mui-pull-left" src="' + Info[i]['pic'] + '">' +
								'<div class="mui-media-body">' + Info[i]['kind'] +
								'<p class="mui-ellipsis">' + Info[i]['description'] + '</p>';
								if(Info[i]['state']===1){
									tempEle += '<p class="mui-ellipsis">已解决</p>';
								}else{
									tempEle += '<p class="mui-ellipsis">尚未解决</p>';
								}
								tempEle+='</div></li>';
							Ele.append(tempEle)
						}
					},
					error: function() {
						mui.toast("网络开小差了");
					}
				});
			}
		</script>
	</body>
</html>
